package com.thermal.thermal_inspection.mapper;

import com.thermal.thermal_inspection.entity.Inspection;
import com.thermal.thermal_inspection.entity.InspectionData;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface InspectionDataMapper {
    /**
     * 新增巡检任务详情
     */
    int addInspectionData(int inspectionId, int inspectionGroupId, int mapDetailId, String inspectionDataDesc, String inspectionDataName);
    /**
     * 根据InspectionId获取所有巡检任务详情
     */
    List<InspectionData> getInspectionDataByInspectionId(int inspectionId);

    /**
     * 删除地图点位
     */
    int deleteMapDetail(int mapDetailId);

    /**
     * 通过inspectionId获取inspectionData列表
     */
    List<InspectionData> getInspectionDataListById(int inspectionId);

    /**
     * 通过inspectionDataId获取巡检任务详情
     */
    InspectionData getInspectionDataById(int inspectionDataId);

    /**
     * 修改任务详情
     */
    int changeInspectionData(int inspectionDataId, int inspectionId, int inspectionGroupId, int mapDetailId, String inspectionDataDesc, String inspectionDataName);

    /**
     * 删除巡检任务
     */
    int deleteInspection(int inspectionId);

    /**
     * 通过地图id获取inspectionMap列表
     */
    List<InspectionData> getInspectionDataListByMap(int mapId);
    /**
     * 根据inspectionGroupId来查询模版
     */
    InspectionData getInspectionDataByGroupId(int inspectionGroupId);
}
